const express = require('express')
const router = express.Router()
const artcateHandler = require('../router_handler/artcate')
const expressjoi = require('@escook/express-joi')
const { add_cate_schema, delete_cate_schema, get_cate_schema, update_cate_schema } = require('../schema/artcate')
router.get('/cates', artcateHandler.getArtcate)
router.post('/addcates', expressjoi(add_cate_schema), artcateHandler.addArticleCates)
router.get('/deletecate/:id', expressjoi(delete_cate_schema), artcateHandler.deleteCateById)
router.get('/cates/:id', expressjoi(get_cate_schema), artcateHandler.getArtCateById)
router.post('/updatecate', expressjoi(update_cate_schema),artcateHandler.updateCateById)
module.exports = router